<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<head>
    <title>按件规则导入历史记录</title>
    <style>
        .table-responsive{
            overflow: auto; width: 100%;
        }
        .table {
            white-space: nowrap;
            overflow:scroll;
            width: inherit;
        }
        .table td {
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div ng-app="myApp" ng-controller="PieceRuleLogCtrl">
        <div class="row">
            <ui-container url="rule/rulelog/piecerule/list" key="pieceRuleLog-list-00">
                <ui-search-form>
                    <search-date format="yyyy-mm-dd" class="col-md-3" name="startTime" id="startTime" placeholder="导入时间段开始时间" ></search-date>
                    <search-date format="yyyy-mm-dd" class="col-md-3" name="endTime" id="endTime" placeholder="导入时间段结束时间" ></search-date>
                    <search-select class="col-md-3" name="changeType" >
                        <option value="-1">请选择更新方式</option>
                        <option value="0">更新</option>
                        <option value="1">删除</option>
                        <option value="2">新增</option>
                    </search-select>
                    <search-select-remote placeholder="请选择版本号" url="rule/rulelog/piecerule/getversionlist" class="col-md-3" name="version" value-name="version" text-name="version">
                </ui-search-form>
                <ui-table-tool>
                    <a class="btn btn-sm btn-primary" href="javascript:void(0);" onclick="reSet()">重置</a>
                </ui-table-tool>
                <ui-table>
                </ui-table>
                <table-page/>
            </ui-container>
        </div>
    </div>
<script>
    angular.module('myApp',['ui.table']);
    angular.module('myApp').controller('PieceRuleLogCtrl', function($scope){

        $scope.addOrg = function (items) {
            console.info(items)
        };

        $scope._columns=[
            {name:'updateUser',head:'修改人'},
            {name:'createTime',head:'修改时间',render(data,value){
                return value == null ? '': new Date(value).format("yyyy-MM-dd hh:mm:ss");
            }},
            {name:'version',head:'版本号',render(data,value){
                return value == null ? '': value;
            }},
            {name:'changeType',head:'更新类型',render(data,value){
                switch (value + ""){
                    case "0" :
                        return "更新";
                    case "1" :
                        return "删除";
                    case "2" :
                        return "新增";
                    default : return "";
                }
            }},
            {name:'calculateType',head:'规则类型',render(data,value){
                return value == 0 ?'按件':'按重' ;
            }},
            {name:'supplierName',head:'供应商',render(data,value){
                return value == null ? '': value;
            }},
            {name:'carrierName',head:'承运商',render(data,value){
                return value == null ?'':value ;
            }},
            {name:'toProvinceName',head:'目的省份',render(data,value){
                return value == null ? '': value;
            }},
            {name:'toCityName',head:'目的城市',render(data,value){
                return value == null ?'':value ;
            }},
            {name:'regionType',head:'结算区域',render(data,value){
                switch (value + ""){
                    case "0" :
                        return "一类区域";
                    case "1" :
                        return "二类区域";
                    case "2" :
                        return "三类区域";
                    default : return "";
                }
            }},
            {name:'settlementType',head:'价格类型',render(data,value){
                switch (value + "") {
                    case "0" :
                        return "投递员价";
                    case "1" :
                        return "合作价";
                    case "2" :
                        return "合作站点价";
                    default :
                        return "";
                }
            }},
            {name:'fromProvinceName',head:'发货省份',render(data,value){
                return value == null ?'':value ;
            }},
            {name:'fromCityName',head:'发货城市',render(data,value){
                return value == null ?'':value ;
            }},
            {name:'firstPrice',head:'首件价',render(data,value){
                return value == null?'': value;
            }},
            {name:'secondPrice',head:'拖件价',render(data,value){
                return value == null?'': value;
            }},
            {name:'codMajor',head:'代收款(首件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'codDrag',head:'代收款(拖件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'directionMajor',head:'上门退换(首件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'directionDrag',head:'上门退换(拖件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'expressScheduleTypeMajor',head:'当日达(首件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'expressScheduleTypeDrag',head:'当日达(拖件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'temperatureMajor',head:'冷链(首件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'temperatureDrag',head:'冷链(拖件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'cainiaoMajor',head:'菜鸟驿站(首件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'cainiaoDrag',head:'菜鸟驿站(拖件)/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'weight',head:'总量加钱项比较值',render(data,value){
                return value == null?'': value;
            }},
            {name:'weightMajor',head:'首件 重量加钱项（超过5kg）/元',render(data,value){
                return value == null?'': value;
            }},
            {name:'weightDrag',head:'拖件 重量加钱项（不超过5kg）/元',render(data,value){
                return value == null?'': value;
            }}
        ];
    });
</script>
<script src="static/common/js/common.js"></script>
</body>
</html>
